#ifndef BASERECORDER_H
#define BASERECORDER_H

#include <QImage>
#include <QObject>
#include <QThread>
#include <thread>
#include <memory>

/**
 * @brief 编码器基类
 * 
 */
class BaseRecorder : public QObject {
  Q_OBJECT
 public:
  explicit BaseRecorder(QObject* parent = nullptr);

  virtual bool init() { return true; }

  virtual bool openFile(const QString& basename) { return false; }

 public slots:
  virtual void onImage(std::shared_ptr<QImage> img) {}

 signals:

 private:
  QThread m_thread;
};

#endif  // BASERECORDER_H
